package com.anhry.app.safety.manage.system.struts.action;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.anhry.app.safety.manage.system.bean.TbUser;
import com.anhry.app.safety.manage.system.struts.base.SystemBaseAction;
import com.anhry.app.safety.util.Loggers;
import com.anhry.app.safety.util.Util;

/**
 * @date:2012-5-16
 * @remark:
 * @author:dongbin
 */

@Controller
@Scope("prototype")
public class WelcomeAction extends SystemBaseAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	public String execute(){
		try {
			TbUser user = (TbUser)this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
			String grade = user.getTbUserGrade().getId().toString();
			if("0".equals(grade) || "1".equals(grade)){
//				return "wel_online";
			}
			return "wel_right";
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.info("登录的欢迎页WelcomeAction异常："+e.getMessage());
		}
		return ERROR;
	}

}
